/****************************************************************************
	This file is part of Basqet.

	Basqet is free software: you can redistribute it and/or modify
	it under the terms of the GNU General Public License as published by
	the Free Software Foundation, either version 3 of the License, or
	(at your option) any later version.

	Basqet is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
	GNU General Public License for more details.

	You should have received a copy of the GNU General Public License
    along with Basqet.  If not, see <http://www.gnu.org/licenses/>.

****************************************************************************/

#ifndef BASKETCONTENT_H
#define BASKETCONTENT_H

#include "notedata.h"
#include "notepadpagedata.h"


#include <QObject>
#include <QSharedData>
#include <QPointer>
#include <QExplicitlySharedDataPointer>
#include <QList>

class BasketDescriptor;

class BasketContent : public QObject, public QSharedData
{
	Q_OBJECT
	public:
		BasketContent(const QString& location);

		QExplicitlySharedDataPointer<NotePadPageData>	getNotePadPageData() const;
		QList< QExplicitlySharedDataPointer<NoteData> >	getNotes() const;

		QExplicitlySharedDataPointer<NoteData>			createTextNote(QPoint place);
		QExplicitlySharedDataPointer<NoteData>			createTextNote(const NoteData* copyFrom = 0);

		void deleteTextNote(QExplicitlySharedDataPointer<NoteData> pNote);

		void openBasket();

	public slots:
		void actionSave();
		void printXML();

		void actionExportBasketTo(QString fileName);

	signals:
		void noteDataCreated(QExplicitlySharedDataPointer<NoteData> noteData);

	private:


	private:
		QPointer<BasketDescriptor>						mBasketDescriptor;
		QExplicitlySharedDataPointer<NotePadPageData>	mNotePadPageData;

		QList< QExplicitlySharedDataPointer<NoteData> >	mNotes;


};

#endif // BASKETCONTENT_H
